package com.zbkj.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.zbkj.common.model.DeliveryPersonnel;
import com.zbkj.common.request.*;
import com.zbkj.common.response.DeliveryPersonnelLoginResponse;
import com.zbkj.common.response.OrderFrontDataResponse;
import com.zbkj.common.vo.MyRecord;

import java.util.List;
import java.util.Map;

/**
 * @author keNan
 * @description DeliveryPersonnelService 接口
 * @date 2025-03-12
 */
public interface DeliveryPersonnelService extends IService<DeliveryPersonnel> {

    List<DeliveryPersonnel> getList(DeliveryPersonnelSearchRequest request, PageParamRequest pageParamRequest);

    /**
     * 校验手机号格式以及是否被注册
     *
     * @param deliveryPersonnelRequest
     */
    void check(DeliveryPersonnelRequest deliveryPersonnelRequest);

    /**
     * 配送员登录
     *
     * @param request
     * @return
     */
    DeliveryPersonnelLoginResponse login(DeliveryPersonnelLoginRequest request);


    /**
     * 查询配送员正在配送的订单列表
     *
     * @param deliveryPersonnelOrderStatusRequest
     * @return
     */
    PageInfo<OrderFrontDataResponse> orderManage(DeliveryPersonnelOrderStatusRequest deliveryPersonnelOrderStatusRequest);

    /**
     * 配送员扫门店订单二维码
     *
     * @param orderNo
     * @return
     */
    Boolean scanCode(String orderNo);


    /**
     * 配送员已送达
     *
     * @param orderNo
     * @return
     */
    Boolean delivered(String orderNo);

    /**
     * 调整订单
     *
     * @param productAttrAdjustRequest
     * @return
     */
    Boolean adjustOrder(ProductAttrAdjustRequest productAttrAdjustRequest);

    /**
     * 发送定位
     *
     * @param locationRequest
     * @return
     */
    Boolean sendLocation(LocationRequest locationRequest);


    /**
     * 查询配送员是否有待配送订单
     *
     * @param status
     * @return
     */
    Boolean toDelivered(Integer status);


    /**
     * 根据账户获取车辆列表
     *
     * @param userId
     * @return
     */
    Map vehicleList(String userId);


    /**
     * 根据IMEI获取最新定位数据
     *
     * @param imei
     * @return
     */
    String getLocationByImei(String imei);

    /**
     * 我的个人中心配送地图定位数据
     *
     * @return
     */
    Map<String, String> getCenter();
}